<template>
	<view>
		<view class="cu-modal" :class="modalName=='Image'?'show':''">
			<view class="cu-dialog">
				<view class="bg-img" :style="{'backgroundImage':'url(' + image + ')'}">
					<view class="cu-bar justify-end text-white">
						<view class="action" @tap="hideModal">
							<text class="cuIcon-close "></text>
						</view>
					</view>
				</view>
				<view class="cu-bar bg-white">
					<view class="action margin-0 flex-sub  solid-left" @tap="hideModal">关闭</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"ModelImage",
		data() {
			return {
				modalName: null,
			}
		},
		props:{
			image:{
				type:String,
				default:''
			}
		},
		methods: {
			showModal(e) {
				this.modalName = 'Image'
			},
			hideModal(e) {
				this.modalName = null
			},
		}
	}
</script>

<style>
.bg-img {
    height:400rpx;
    background-size: 100% 100%;
}
</style>
